package com.xayy.health.ds.service;


import cn.kawins.base.result.CheckResult;
import com.xayy.health.core.config.datasource.DatasourceSelector;
import com.xayy.health.ds.model.DsAlgorithmParams;
import com.xayy.health.ds.model.DsCalculateModelTrain;
import com.xayy.health.mgt.model.CalculateData;
import com.xayy.health.mgt.model.CalculateModelTrain;
import com.xayy.health.mgt.model.dto.TelemetryDto;
import com.xayy.health.mgt.model.vo.PredictDataVo;
import com.xayy.health.mgt.model.vo.ResultDataVo;
import com.xtck.ha.common.core.web.service.IBaseService;
import org.apache.ibatis.annotations.Param;

import java.net.UnknownHostException;
import java.util.List;

/**
* @ClassName: DsAlgorithmParamsService
* @Description: DsAlgorithmParams业务访问接口
* @author liuyuan
* @date 2025-07-08
*/
public interface DsCalculateService extends IBaseService<DsAlgorithmParams> {
    /**
     * 模型训练
     *
     * @param modelTrain 入参信息
     * @param recordId   入参
     * @return 结果日志
     */
    CheckResult<Object> modelTrial(DsCalculateModelTrain modelTrain, Long recordId) throws UnknownHostException;

    /**
     * 启动模型
     * @param modelTrain 入参信息
     * @return 结果日志
     */
    CheckResult<?> startModel(DsCalculateModelTrain modelTrain);

    /**
     * 趋势预测上线运行
     * @param telemetryDto 参数
     * @return CheckResult
     */
    CheckResult<Object> online(TelemetryDto telemetryDto);

    /**
     * 根据子任务id获取任务预测点集合
     * @param predictDataVo 任务id
     * @return 结果日志
     */
    CheckResult<Object> getTaskTrendDataList(PredictDataVo predictDataVo) throws UnknownHostException;

    /**
     * 查询结果数据
     * @param resultDataVo
     * @return 结果日志
     */
    CheckResult<Object> getResultDataList(ResultDataVo resultDataVo) throws UnknownHostException;

    /**
     * 获取结果数据
     * @param resultDataVo 查询条件
     * @return List<TelemetryData>
     */
    List<CalculateData> selectResultData( ResultDataVo resultDataVo);
}

